<template>
	<view class="mine">
		<u-navbar title="帮助中心" placeholder bgColor="transparent" @leftClick="back"></u-navbar>
		<view class="mine_top">
			<view class="top_title">
				帮助中心
			</view>
			<view class="top_tip">
				如需帮助请联系在线客服
			</view>
			<image src="../../static/ico/right.png"></image>

		</view>
		<view class="main_main">
			<view class="main_title">常见问题</view>
			<view class="main_item">
				<view class="item_left">
					<image src="../../static/ico/left1.png"></image>
					<view class="left_title">{{list1.title}}</view>
				</view>
				<view class="item_right">
					<view class="right_item" v-for="(el,index) in list1.data">
						<span></span>
						{{el.title}}
					</view>
				</view>

			</view>
			<view class="main_item" v-show="list2.data.length>0">
				<view class="item_left">
					<image src="../../static/ico/left1.png"></image>
					<view class="left_title">{{list2.title}}</view>
				</view>
				<view class="item_right">
					<view class="right_item" v-for="(el,index) in list2.data">
						<span></span>
						{{el.title}}
					</view>
				</view>
			</view>
			<view class="main_item" v-show="list3.data.length>0">
				<view class="item_left">
					<image src="../../static/ico/left1.png"></image>
					<view class="left_title">{{list3.title}}</view>
				</view>
				<view class="item_right">
					<view class="right_item" v-for="(el,index) in list3.data">
						<span></span>
						{{el.title}}
					</view>
				</view>
			</view>			

			<view class="main_bottom">
				<view class="bot_1">
					<u-icon name="kefu-ermai" color="#2979ff" size="28" style="padding-right:20rpx;"></u-icon>
					在线客服
				</view>
				<view class="bot_2">
					人工客服在线时间10:00-19:00
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	import {
		mixin
	} from '@/Mixins/mixin.js'
	export default {
		mixins: [mixin],
		data() {
			return {
				list: [],
				list1: {
					title: '',
					data: [],
				},
				list2: {
					title: '',
					data: [],
				},
				list3: {
					title: '',
					data: [],
				},
				page: 1,
				pageSize: 10,
			}
		},
		onReady() {

		},
		onLoad() {
			this.getbanner();

		},
		methods: {
			async getbanner() {
				let banner = await this.articleList(5)
				if (banner.code == 200) {
					this.list = banner.data;
					this.list.forEach((el, i) => {
						if (el.cate_id == 1) {
							this.list1.title = el.type_name;
							this.list1.data.push(el);
						} else if (el.cate_id == 2) {
							this.list2.title = el.type_name;
							this.list2.data.push(el);
						} else {
							this.list3.title = el.type_name;
							this.list3.data.push(el);
						}
					})
				}

			},

		}
	}
</script>

<style lang="scss" scoped>
	.mine {
		min-height: 100vh;
		// padding: 30rpx;
		box-sizing: border-box;
		background-color: $nft-bg-color;

		.mine_top {
			width: 100%;
			height: 418rpx;
			position: relative;
			background: url("../../static/ico/helpban.png");
			// margin-top:-40px;
			top: 0;

			.top_title {
				font-size: 38px;
				font-weight: 600;
				color: #FFFFFF;
				position: absolute;
				left: 36rpx;
				top: 180rpx;
				// line-height: 53px;
			}

			.top_tip {
				font-size: 24rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #FFFFFF;
				line-height: 17px;
				position: absolute;
				left: 36rpx;
				top: 294rpx;
			}

			image {
				position: absolute;
				right: 80rpx;
				bottom: 0;
				width: 156rpx;
				height: 164rpx;
			}

		}

		.main_main {
			width: 100%;
			border-radius: 10px 10px 0px 0px;
			background: #fff;
			// min-height: 1200rpx;
			box-sizing: border-box;
			padding: 30rpx 0;
			display: flex;
			flex-direction: column;
			// justify-content: space-between;

			.main_title {
				font-size: 32rpx;
				font-weight: 600;
				color: #333333;
				padding-top: 26rpx;
				padding-left: 48rpx;
			}

			.main_item {
				display: flex;
				// justify-content: space-between;
				align-items: center;
				padding: 0 48rpx;

				border-bottom: 1px solid #F2F2F2;

				.item_left {
					width: 140rpx;

					image {
						width: 80rpx;
						height: 80rpx;
						margin-left: 34rpx;
					}

					.left_title {
						width: 140rpx;
						font-size: 14px;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
						text-align: center;
					}

				}

				.item_right {
					margin-left: 90rpx;
					flex: 1;

					.right_item {
						display: flex;
						align-items: center;
						font-size: 28rpx;
						font-weight: 400;
						color: #333333;
						line-height: 90rpx;
						border-bottom: 1px solid #F2F2F2;
						flex: 1;

						span {
							display: inline-block;
							width: 5px;
							height: 5px;
							background: #E5E9EC;
							margin-right: 11px;
						}
					}

					.right_item:nth-last-child(1) {
						border: none;
					}
				}

			}

		}

		.main_bottom {
			margin-top: 40rpx;

			.bot_1 {
				display: flex;
				align-items: center;
				margin: 0 auto;
				justify-content: center;
				margin-top: 36rpx;
				font-size: 14px;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #131415;

			}

			.bot_2 {
				text-align: center;
				margin-bottom: 40rpx;
				font-size: 10px;
				font-weight: 400;
				color: #8B8B93;
				margin-top: 20rpx;
			}
		}
	}
</style>
